<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<title>酒店管理系统</title>
		<link href="../css/css.css" rel="stylesheet" type="text/css" />
		
		<sx:head parseContent="true" />
	</head>
	<body>

		<div class="top_img" align="right">
			<table width="38%" border="0" cellpadding="0" cellspacing="0"
				style="margin-top: 26px; color: #FF6E00;">
				<tr>
					<td width="41%" align="left">
						位置：客服平台
					</td>
					<td width="41%" align="left">
						用户：张三
					</td>
					<td width="18%" align="left">
						<a href="#">退出</a>
					</td>
				</tr>

			</table>
		</div>

		<div class="mid">
			<div class="left">


				<div class="left2">
					<div class="left2_1">
						<img src="images/left2_01.jpg" />
					</div>
					<div class="left2_2" id="left">
						<ul>
							<li>
								电话接听列表
							</li>
							<li>
								<a href="#">电话一</a>
							</li>
							<li>
								<a href="#">电话二</a>
							</li>
							<li>
								<a href="#">电话三</a>
							</li>
							<li>
								<a href="#">电话四</a>
							</li>
						</ul>
						<ul>
							<li>
								操作列表
							</li>
							<li>
								<a href="#" class="tab-btn" index="1">客服工作日志</a>
							</li>

							<li>
								<a href="#" class="tab-btn" index="2">客房查询</a>
							</li>

							<li>
								<a href="#" class="tab-btn" index="3">客房预订</a>
							</li>


						</ul>
					</div>
				</div>
				<div class="left2_1">
					<img src="images/left2_02.jpg" />
				</div>
			</div>

		<div class="right">
			<div class="right1">
				现在的位置： 客户信息：
			</div>
			<div class="right2" align="center">
				<div class="right2_tt" align="left">
					显示客户信息########
				</div></div>
				<div class="right3">
				<div class="tab-body" id="tab-body-1">
					<tr>
						<td>
							序号
						</td>
						<td>
							流水号
						</td>
						<td>
							客户姓名
						</td>
						<td>
							服务类型
						</td>
						<td>
							服务详情
						</td>
						<!--
					<td width="50">
						操作
					</td>  -->

					</tr>
					<s:iterator var="serverlog" value="#session.serverlog"
						status="index">
						<tr>
							<td>
								<s:property value="#index.count" />
							</td>
							<td>
								<s:property value="#serverlog.serialnum" />
							</td>
							<td>
								<s:property value="#serverlog.Customer.cname" />
							</td>
							<td>
								<s:property value="#serverlog.Consulttype.type"></s:property>
							</td>
							<td>
								<s:property value="#serverlog.operation"></s:property>
							</td>

							<!-- <td width="50">
							<s:a action="Goods" method="removeGoodById">
								<s:param name="sid" value="#session.saler.sid" />
								<s:param name="gid" value="#good.gid" />删除  				
 				</s:a>
							<s:a action="Goods" method="getGoodById">
								<s:param name="sid" value="#session.saler.sid" />
								<s:param name="gid" value="#good.gid" />修改 				 				
 				</s:a>
						</td> -->
						</tr>
					</s:iterator>
				</div>
				<div class="tab-body" id="tab-body-2">
					<!--<s:form action=".action"  theme="simple">
						-->
						
						<sx:datetimepicker label="入住时间" name="sage" value="today" id="inTime"></sx:datetimepicker>

						<br/>
						<sx:datetimepicker label="离店时间" name="sage" value="today" id="outTime"></sx:datetimepicker>

						<br/>
						<s:select label="选择房型" name="roomStyle" id="roomStyle"
									list="#session.types" listKey="rtid" listValue="tname"
									headerKey="0" headerValue="---请选择商品类别---" ></s:select>
						<br/><input type="button" id="queryRoom" value="提交"/>
						
						
					<!--</s:form>
					-->
					
					<div id="roomList">
					
					
					<table>
					<tr>
					<td>序号</td>
					<td>房间号</td>
					<td>说明</td>
					<td></td>
					</tr>
					<s:iterator var="rooms" value="#session.rooms"
						status="index">
					<tr>
					<td>
					<s:property value="#index.count" />
					</td>
					<td>
					<s:property value="#rooms.rid" />
					</td>
					<td>
					<s:property value="#rooms.desc" />
					</td>
					<td>
					预定
					</td>
					</tr>
					</s:iterator>
					</table>
					
					
					
					</div>
					</div>
				<div class="tab-body" id="tab-body-3"></div>
			</div></div>

			<div style="clear: both;"></div>
			<div class="btt" align="center">
				<table width="98%" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td width="50%">
							日期：<span id="time-show"></span>
						</td>
						<td width="50%" align="right">
							星期一酒店客房管理系统
						</td>
					</tr>
				</table>
			</div>
			<script src="../js/jquery-1.8.1.min.js"></script>
			
	<script type="text/javascript">
		var $tabCtrl = $("#left");
		var $tabBody = $(".tab-body");
		$("#tab-body-1").css({"display":"block"});
		$tabCtrl.on('click', '.tab-btn', function(e) {
			e.preventDefault();
			var $ele = $(e.currentTarget);
			var index = $ele.attr("index");
			$tabBody.css({"display":"none"});
			$("#tab-body-"+index).css({"display":"block"});
		});
		
		var $timeShow = $("#time-show");
		setInterval(function() {
			var date = new Date();
			$timeShow.text(date.toLocaleDateString()+'   '+date.toLocaleTimeString());
		},1000);
		
		
		$("#queryRoom").click(function(){
			
			var inTime = $($("#inTime").find("input").get(0)).val();
			var outTime = $($("#outTime").find("input").get(0)).val();
			var roomStyle = $("#roomStyle").val();
			
			$.ajax({   
				url: "/callCenter/Query.action?method:queryRoom&"+"inTime="+inTime+"&"+"outTime="+outTime+"&"+"roomStyle="+roomStyle,  
				type:"GET",
				dataType:"html",
				cache:false,
				contentType:"text/html; charset=UTF-8",
				success:function(data){
					$("#roomList").empty();
					$("#roomList").html(data);
				}
			});
		});
			
		
	</script>

	</body>
</html>
